<template>
  <div class="VehicleArchivesDetails">
    <!-- <mt-cell :title="title"></mt-cell>
    <mt-cell title="地区" :value="dataForm.baseAreaName"></mt-cell>
    <mt-cell title="档案号" :value="dataForm.licenseNo"></mt-cell>
    <mt-cell title="状态" :value="dataForm.carStateName"></mt-cell>
    <mt-cell title="车牌号码" :value="dataForm.carNo"></mt-cell>
    <mt-cell title="车辆类型" :value="dataForm.carTypeName"></mt-cell>
    <mt-cell title="卡号" :value="dataForm.cardNo"></mt-cell>
    <mt-cell title="登记日期" :value="dataForm.regDate"></mt-cell>
    <mt-cell title="制证日期" :value="dataForm.accDate"></mt-cell>
    <mt-cell title="发证日期" :value="dataForm.certDate"></mt-cell>
    <div v-if="this.MapStateDate.certType == 1">
      <mt-cell title="所属单位" :value="dataForm.deptName"></mt-cell>
      <mt-cell title="使用单位" :value="dataForm.deptUseName"></mt-cell>
      <mt-cell title="校验日期" :value="dataForm.checkDate"></mt-cell>
      <mt-cell title="出厂日期" :value="dataForm.madeDate"></mt-cell>
      <mt-cell title="发动机号" :value="dataForm.engineNo"></mt-cell>
      <mt-cell title="车架号" :value="dataForm.vinNo"></mt-cell>
      <mt-cell title="厂牌型号" :value="dataForm.facNo"></mt-cell>
      <mt-cell title="轮胎数量" :value="dataForm.tireNum"></mt-cell>
      <mt-cell title="载客人数" :value="dataForm.bearNum"></mt-cell>
      <mt-cell title="燃油类型" :value="dataForm.fuelType"></mt-cell>
      <mt-cell title="车辆颜色" :value="dataForm.carColor"></mt-cell>
      <mt-cell title="车辆来历" :value="dataForm.carSource"></mt-cell>
      <mt-cell title="进出道口" :value="dataForm.crosses"></mt-cell>
      <mt-cell title="获取日期" :value="dataForm.startDate"></mt-cell>
      <mt-cell title="检验到期日期" :value="dataForm.endDate "></mt-cell>
      <mt-cell title="是否重点监控" :value="dataForm.importantFlag"></mt-cell>
      <mt-cell title="备注" :value="dataForm.remarks"></mt-cell>
    </div>
    <div
      v-if="this.MapStateDate.certType == 2 || this.MapStateDate.certType == 4 || this.MapStateDate.certType == 5"
    >
      <mt-cell title="使用单位" :value="dataForm.deptUseName"></mt-cell>
      <mt-cell title="驾驶员姓名" :value="dataForm.driverName"></mt-cell>
      <mt-cell title="进出道口" :value="dataForm.crosses"></mt-cell>
      <mt-cell title="获取日期" :value="dataForm.startDate"></mt-cell>
      <mt-cell title="检验到期日期" :value="dataForm.endDate "></mt-cell>
      <mt-cell title="备注" :value="dataForm.remarks"></mt-cell>
    </div>
    <div v-if="this.MapStateDate.certType == 2">
      <mt-cell title="是否重点监控" :value="dataForm.importantFlag"></mt-cell>
    </div>

    <div v-if="this.MapStateDate.certType == 3">
      <mt-cell title="使用单位" :value="dataForm.deptUseName"></mt-cell>
      <mt-cell title="驾驶员姓名" :value="dataForm.driverName"></mt-cell>
      <mt-cell title="所属单位" :value="dataForm.deptId "></mt-cell>
      <mt-cell title="进出道口" :value="dataForm.crosses"></mt-cell>
      <mt-cell title="获取日期" :value="dataForm.startDate"></mt-cell>
      <mt-cell title="检验到期日期" :value="dataForm.endDate "></mt-cell>
      <mt-cell title="安全监管和引领陪同人" :value="dataForm.leaderid"></mt-cell>
      <mt-cell title="申请理由" :value="dataForm.applyRemarks"></mt-cell>
      <mt-cell title="备注" :value="dataForm.remarks"></mt-cell>
    </div>
    <div v-if="this.MapStateDate.certType == 6">
      <mt-cell title="非机动车牌号" :value="dataForm.carNo"></mt-cell>
      <mt-cell title="车辆类型" :value="dataForm.carTypeName"></mt-cell>
      <mt-cell title="使用单位" :value="dataForm.deptUseName"></mt-cell>
      <mt-cell title="车辆颜色" :value="dataForm.carColor"></mt-cell>
      <mt-cell title="车架号" :value="dataForm.vinNo"></mt-cell>
      <mt-cell title="所属单位" :value="dataForm.deptId "></mt-cell>
      <mt-cell title="进出道口" :value="dataForm.crosses"></mt-cell>
      <mt-cell title="获取日期" :value="dataForm.startDate"></mt-cell>
      <mt-cell title="检验到期日期" :value="dataForm.endDate "></mt-cell>
      <mt-cell title="安全监管和引领陪同人" :value="dataForm.leaderid"></mt-cell>
      <mt-cell title="申请理由" :value="dataForm.applyRemarks"></mt-cell>
      <mt-cell title="备注" :value="dataForm.remarks"></mt-cell> -->
    <!-- </div> -->
  </div>
</template>

<script>
import { mapState, mapMutations } from "vuex";
export default {
  data() {
    return {
      data: "",
      dataForm: [],
      title: "",
      MapStateDateAll: this.$store.state.VehicleData,
      dataid:''
    };
  },
  components: {},
  created() {},
  computed: {
    MapStateDate() {
      return this.$store.state.VehicleData;
    }
  },
  mounted() {
    this.$store.commit("SET_USER_INFO", "档案详情");
    // this.DataIndex();
    this.deleteRow();
  },
  watch: {},
  methods: {
    deleteRow() {
    this.dataid = this.$route.query.id
      this.$store.dispatch("pageIndex", dataid).then(data => {
          console.log(data)
      });
    },
    DataIndex: function() {
      this.dataForm = this.MapStateDate;
      //  内场牌照
      if (this.MapStateDate.certType == 1) {
        this.title = "内场牌照";
      } else if (this.MapStateDate.certType == 2) {
        this.title = "限期通行证";
      } else if (this.MapStateDate.certType == 3) {
        this.title = "临时通行证";
      } else if (this.MapStateDate.certType == 4) {
        this.title = "B3通行证";
      } else if (this.MapStateDate.certType == 5) {
        this.title = "B3临时通行证";
      } else if (this.MapStateDate.certType == 6) {
        this.title = "非机动车通行证";
      }
    }
  }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scpoed>
.VehicleArchivesDetails {
  position: fixed;
  top: 0.7rem;
  left: 0;
  overflow-y: scroll;
  width: 100%;
  height: auto;
  -webkit-overflow-scrolling: touch;
  bottom: 0;
}
.VehicleArchivesDetails .mint-cell-title {
  text-align: left;
}
</style>
